How to make plugin compatible with ID limit adjuster?

0x40122D - holds a pointer to CStreaming::ms_modelInfoPtrs array (0x0xA9B0C8 by default)
(0x408ADA + 3) - holds a pointer to CStreaming::ms_aInfoForModel array (0x8E4CC0 by default)

(0x4C51CD + 1) - holds a pointer to CAnimManager::ms_aAnimBlocks(0xB5D4A0 by default)
(0x1560EA1 + 1) - holds a pointer to CVehicleRecording::StreamingArray (0x97D880 by default)
(0x408AB9 + 1) - holds a pointer to CTheScripts::StreamedScripts (0xA47B60 by default)

Structure CStreamedScripts is modified.

Fields:
CStreamedScriptInfo[numberOfSCMscripts];
int largestExternalSize;
__int16 countOfScripts;
__int16 field_A46;


See this structure:
#pragma pack(push, 1)
struct CStreamedScripts_Footer
{
	int largestExternalSize;
	__int16 countOfScripts;
	__int16 field_A46;
};
#pragma pack(pop)


If you want to access the last 3 members, you need to calculate address like this:

	CStreamedScriptInfo* CTheScripts__StreamedScriptsArray = (CStreamedScriptInfo*)CTheScripts__StreamedScripts;
	CStreamedScripts_Footer* CTheScripts__StreamedScriptsFooter = (CStreamedScripts_Footer*)(CTheScripts__StreamedScripts + numberOfSCMfiles * sizeof(CStreamedScriptInfo));

------------------------------------

Base ID indexes (DWORD values)
(0x407104 + 2) - holds TXD base index (20000 by default)
(0x410344 + 2) - holds COL base index (25000 by default)
(0x4044F4 + 2) - holds IPL base index (25255 by default)
(0x44E4C4 + 1) - holds DAT base index (25511 by default)
(0x40C1A4 + 1) - holds IFP base index (25575 by default)
(0x4594A1 + 2) - holds RRR base index (25755 by default)
(0x40C1C4 + 1) - holds SCM base index (26230 by default)

If you need to know the value of ID limits, you should perform subtraction.
numberOfTXDfiles = baseCOLindex - baseTXDindex;

To know the limit of SCM scripts, you should read WORD value from 0x470917

Author: fastman92